﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace Oroboros.Save_Data
{
    public class InventorySaveData : INotifyPropertyChanged
    {
        private int _GridHeight;
        private int _GridWidth;
        private ObservableCollection<ItemSaveData> _Items = new ObservableCollection<ItemSaveData>();

        public int GridHeight { get { return _GridHeight; } set { Changed("GridHeight"); _GridHeight = value; } }
        public int GridWidth { get { return _GridWidth; } set { Changed("GridWidth"); _GridWidth = value; } }
        public ObservableCollection<ItemSaveData> Items { get { return _Items; } set { Changed("Items"); _Items = value; } }

        public event PropertyChangedEventHandler PropertyChanged;
        public void Changed(string n)
        {
            if (PropertyChanged == null) return;
            if (!string.IsNullOrEmpty(n))
                PropertyChanged(this, new PropertyChangedEventArgs(n));
        }
    }
}
